﻿using Pay.Core;
using Pay.TO;
using System;
using System.Collections.Generic;

namespace Pay.DTO {
    /// <summary>
    /// 领取马力值任务表 mc_SoupTask
    /// </summary>
    [Serializable]
    public class soup_task_dto {
        /// <summary>
        /// 领取马力值任务Id
        /// </summary>
        public long id { get; set; }

        /// <summary>
        /// 任务类型（对应枚举）
        /// </summary>
        public ETaskType type { get; set; }

        /// <summary>
        /// 任务类型枚举值描述
        /// </summary>
        public string type_title {
            get {
                return this.type.ToDescription();
            }
        }

        /// <summary>
        /// 任务分类（枚举）
        /// </summary>
        public ESoupTaskCategory category { get; set; }

        /// <summary>
        /// 任务分类枚举描述
        /// </summary>
        public string category_title { get { return this.category.ToDescription(); } }

        /// <summary>
        /// 适用于(枚举)
        /// </summary>
        public ESoupTaskApply apply { get; set; }

        /// <summary>
        /// 适用于枚举描述
        /// </summary>
        public string apply_title { get { return this.apply.ToDescription(); } }

        /// <summary>
        /// Url地址
        /// </summary>
        public string url { get; set; }

        /// <summary>
        /// 完成该项任务可领取的马力值（注：为空则有具体任务指定，如查看商家介绍）
        /// </summary>
        public int? soup_value { get; set; }

        /// <summary>
        /// 该项任务可执行总次数（为空表示不限制次数，注：如每日登录总次数不限制，由代码限制每天不能重复领取；查看商家介绍等总次数也不限制，代码限制同一介绍不可重复领取）
        /// </summary>
        public int? limit_num { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 小标题
        /// </summary>
        public string sub_title { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string logo_url { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string describe { get; set; }

        /// <summary>
        /// 状态（1：正常，2：停用）
        /// </summary>
        public ESoupTaskStatus status { get; set; }

        /// <summary>
        /// 状态枚举描述
        /// </summary>
        public string status_title { get { return this.status.ToDescription(); } }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time { get; set; }

        /// <summary>
        /// 点击数
        /// </summary>
        public int click_num { get; set; }

        /// <summary>
        /// 完成数
        /// </summary>
        public int get_num { get; set; }
        /// <summary>
        /// 有效天数
        /// </summary>
        public int? limit_day { get; set; }

        /// <summary>
        /// 是否完成
        /// </summary>
        public bool? is_complete { get; set; }

        /// <summary>
        /// 是否在AppStore版本中显示
        /// </summary>
        public bool is_app_store_show { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        /// 弹窗提示
        /// </summary>
        public string prompt { get; set; }
    }

    [Serializable]
    public class soup_task_dto_ex : soup_task_dto {
        /// <summary>
        /// 任务类型枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_task_type_list {
            get { return typeof(ETaskType).GetDropdownItemList(); }
        }

        /// <summary>
        /// 任务类型枚举值
        /// </summary>
        public string type_value { get; set; }
      
        /// <summary>
        /// 状态枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_status_list {
            get { return typeof(ESoupTaskStatus).GetDropdownItemList(); }
        }
        /// <summary>
        /// 状态枚举值
        /// </summary>
        public string status_value { get; set; }
        
        /// <summary>
        /// 任务分类下拉数据
        /// </summary>
        public List<DropdownItem> e_category_list {
            get { return typeof(ESoupTaskCategory).GetDropdownItemList(); }
        }

        /// <summary>
        /// 分类枚举值
        /// </summary>
        public string category_value { get; set; }

        /// <summary>
        /// 适用于枚举下拉数据
        /// </summary>
        public List<DropdownItem> e_apply_list {
            get { return typeof(ESoupTaskApply).GetDropdownItemList(); }
        }

        /// <summary>
        /// 适用于枚举值
        /// </summary>
        public string apply_value { get; set; }
    }
    /// <summary>
    /// 任务
    /// </summary>
    [Serializable]
    public class task_dto {
        /// <summary>
        /// 领取马力值任务Id
        /// </summary>
        public long id { get; set; }
        /// <summary>
        /// 任务马力值
        /// </summary>
        public int soup_value { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string logo_url { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 小标题
        /// </summary>
        public string sub_title { get; set; }
        /// <summary>
        /// 任务分类
        /// </summary>
        public int task_category { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string describe { get; set; }
        /// <summary>
        /// 任务状态（1：正常，2：停用 ,3：也是灰不能点）
        /// </summary>
        public int task_status { get; set; }
        /// <summary>
        /// 是否完成
        /// </summary>
        public bool is_complete { get; set; }
        /// <summary>
        /// 限制人数
        /// </summary>
        public int? limit_num { get; set; }
        /// <summary>
        /// 有效天数
        /// </summary>
        public int? limit_day { get; set; }
        /// <summary>
        /// 任务类别 2邀请好友注册 3关注公众号 4每日登录 5查看商家介绍 6加油卡 7蚂蚁部落 8币金所  9戈仑埠 10时代云商 11信用卡申请
        /// </summary>
        public ETaskType type { get; set; }

        /// <summary>
        /// url
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 1 app 2 网页
        /// </summary>
        public int apply { get; set; }

        /// <summary>
        /// 是否在AppStore版本中显示
        /// </summary>
        public bool is_app_store_show { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; }

        /// <summary>
        /// 弹窗提示
        /// </summary>
        public string prompt { get; set; }
    }
}
